package com.example.online.controller.baseController;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value = "/front")
public class BaseController {
    /**
     * 首页html路由
     * @return
     */
    @GetMapping(value = "/index")
    private String index(){
        System.out.println("访问到首页");
        return "front/mainpage";
    }

    /**
     * 商品列表html 路由
     * @return
     */
    @GetMapping(value = "/shoplist")
    private String shopList()
    {
        return "front/shoplist";
    }

    /**
     * 单个商品详情html 路由
     */
    @GetMapping(value="/shopdetail")
    private String shopDetail(){
        return "shop/shopdetail";
    }
}
